/**
 * User: alesj
 * Date: 11.1.2006
 * Time: 12:26:20
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.alesj.blueberry.par.basic;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Validation error object - log object.
 *
 * @author <a href="mailto:ales.justin@genera-lynx.com">Ales Justin</a>
 */
@Entity
@Table(name = "validation_error")
public class ValidationError implements Serializable {

    private Integer id;
    private RequestEntry requestEntry;
    private String errorType;

    @Id
    @GeneratedValue
    @Column(name = "validation_error_id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @OneToOne
    @JoinColumn(name = "request_entry_id", unique = true, nullable = true, insertable = true, updatable = true)
    public RequestEntry getRequestEntry() {
        return requestEntry;
    }

    public void setRequestEntry(RequestEntry requestEntry) {
        this.requestEntry = requestEntry;
    }

    @Column(name = "error_type")
    public String getErrorType() {
        return errorType;
    }

    public void setErrorType(String errorType) {
        this.errorType = errorType;
    }

}
